//
// Created by v on 24-5-15.
//

#ifndef WIFI_STATION_CM_BROADCAST_FUNC_H
#define WIFI_STATION_CM_BROADCAST_FUNC_H

#include <stdio.h>

typedef struct CMBroadcast *CMBroadcastHandle;

int cm_broadcast_set_info(CMBroadcastHandle h, const char *mac,
                          const char *ip, const char *version);

int cm_broadcast_init(CMBroadcastHandle *h, int port);

int cm_broadcast_socket_init_simple(CMBroadcastHandle h);

int cm_broadcast_bind(CMBroadcastHandle h);

int cm_broadcast_start(CMBroadcastHandle h);

int cm_broadcast_close(CMBroadcastHandle *h);

int cm_broadcast_send(CMBroadcastHandle h, char *data, size_t len);
int cm_broadcast_recv(CMBroadcastHandle h, char *data, size_t len);

#endif //WIFI_STATION_CM_BROADCAST_FUNC_H
